export const reg_gb2312_en = (n = 20) => {
  return new RegExp(`^[\u4E00-\u9FA5A-Za-z]{1,${n}}$`);
};

export const reg_phone =
  /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
export const isValidPositionName = (str: string): boolean =>
  reg_gb2312_en(10).test(str);
export const isValidPhone = (str: string | number): boolean =>
  reg_phone.test(str as unknown as string);
